﻿using System;
using System.Collections.Generic;
using System.Text;
using DevExpress.XtraEditors.Controls;
using DevExpress.XtraGrid.Localization;
using DevExpress.XtraTreeList.Localization;

namespace PublicClass
{
    class ChEditLocalizer:Localizer
    {
        public override string GetLocalizedString(StringId id)
        { 
            switch (id)
            {
                case StringId.PictureEditMenuCut: return "剪切";
                case StringId.PictureEditMenuCopy: return "复制";
                case StringId.PictureEditMenuDelete: return "删除";
                case StringId.PictureEditMenuPaste: return "粘贴";
                case StringId.PictureEditMenuLoad: return "加载";
                case StringId.PictureEditMenuSave: return "保存";
                case StringId.TextEditMenuCut: return "剪切";
                case StringId.TextEditMenuDelete: return "删除";
                case StringId.TextEditMenuCopy: return "复制";
                case StringId.TextEditMenuPaste: return "粘贴";
                case StringId.TextEditMenuSelectAll: return "全选";
                case StringId.TextEditMenuUndo: return "返回";
                case StringId.DateEditToday: return "今天";
                case StringId.DateEditClear: return "取消";  
            } 
            return base.GetLocalizedString(id);
        }

    }

        public class ChGridLocalizer : GridLocalizer
        {

            public override string GetLocalizedString(GridStringId id)
            { 
                switch (id)
                {
                    case GridStringId.GridGroupPanelText: return "拖动列头进行分组";
                    case GridStringId.MenuColumnGroup: return "按该列分组";
                    case GridStringId.MenuColumnSortAscending: return "顺序排序";
                    case GridStringId.MenuColumnSortDescending: return "倒序排序";
                    case GridStringId.MenuColumnClearSorting: return "取消排序";
                    case GridStringId.MenuGroupPanelHide: return "隐藏分组面板";
                    case GridStringId.MenuGroupPanelShow: return "显示分组面板";
                    case GridStringId.MenuColumnRemoveColumn: return "隐藏该列";
                    case GridStringId.MenuColumnColumnCustomization: return "隐藏列管理";
                    case GridStringId.MenuColumnBestFit: return "自适应列宽";
                    case GridStringId.MenuColumnBestFitAllColumns: return "自适应列宽(所有)";
                    case GridStringId.MenuColumnFilterEditor: return "过滤管理";

                    case GridStringId.FilterBuilderCaption: return "字段过滤器";
                    case GridStringId.FilterBuilderOkButton: return "确定";
                    case GridStringId.FilterBuilderCancelButton: return "取消";
                    case GridStringId.FilterBuilderApplyButton: return "应用"; 

                    case GridStringId.MenuGroupPanelFullExpand: return "展开分组子列表";
                    case GridStringId.MenuGroupPanelFullCollapse: return "折叠分组子列表";
                    case GridStringId.MenuGroupPanelClearGrouping: return "清空分组";


                    case GridStringId.CustomizationCaption: return "隐藏列管理器";
                    case GridStringId.CustomizationFormColumnHint: return "拖动列头到此处进行隐藏";  

                } 

                return base.GetLocalizedString(id);
            }
        
        }

        public class ChTreeListLocalizer : TreeListLocalizer
        {
            public override string GetLocalizedString(TreeListStringId id)
            {  
                switch (id)
                {
                    case TreeListStringId.MenuColumnSortAscending: return "顺序排序";
                    case TreeListStringId.MenuColumnSortDescending: return "倒序排序";
                    case TreeListStringId.MenuColumnColumnCustomization: return "隐藏列管理";
                    case TreeListStringId.MenuColumnBestFit: return "自适应列宽";
                    case TreeListStringId.MenuColumnBestFitAllColumns: return "自适应列宽(所有)";


                    case TreeListStringId.ColumnCustomizationText: return "隐藏列管理器";
                    case TreeListStringId.CustomizationFormColumnHint: return "拖动列头到此处进行隐藏";  
                } 
                return base.GetLocalizedString(id);
            }
        }

       

}
